﻿using CleanLite.Application.Services.Base;
using CleanLite.Domain.Entities;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;

namespace CleanLite.Application.Services
{
    public class UserService : BaseService<T_Test>
    {
        [HttpPost]
        public async Task<List<T_Test>> GETAsync(int index, int size)
        {
            RefAsync<int> total = 0;
            return await Repository.GetToPageListAsync(index, size, total);
        }

        public async Task Insert()
        {
            var list = new List<T_Test>();
            for (int i = 0; i < 100; i++)
            {
                list.Add(new T_Test
                {
                    Test1 = i.ToString(),
                    Test2 = i.ToString(),
                    Test3 = i.ToString(),
                    Test4 = i.ToString(),
                });
            }
            //await Repository.InsertAsync(list);
        }
    }
}